<template>
	<view class="myldz">
		<u-navbar bgColor="#fff">
			<view slot="left" class="align-center">
				<image @click="$tools.back()" src="@/static/login/back3.png" style="width: 36rpx; height: 36rpx"></image>
			</view>
			<view slot="center">
				<view style="font-weight: 600; font-size: 36rpx; color: #333333">劳动者列表</view>
			</view>
		</u-navbar>

		<view class="">
			<view class="flex" style="margin-bottom: 25rpx; padding: 0 32rpx">
				<view style="margin-right: 20rpx">
					<image :src="obj.projectImg" style="width: 84rpx; height: 84rpx"></image>
				</view>
				<view class="flex-column flex-between">
					<view class="align-center">
						<view style="font-weight: 600; font-size: 28rpx; color: #333333; margin-right: 20rpx">{{ obj.jobName }}</view>
						<view
							v-if="obj.status == 0"
							class="flex-center1"
							style="width: 104rpx; height: 40rpx; background: #ffffff; border-radius: 8rpx; border: 1rpx solid #f9850b; font-size: 24rpx; color: #f9850b"
						>
							正在招
						</view>
						<view
							v-if="obj.status == 1"
							class="flex-center1"
							style="font-size: 24rpx; color: #999999; width: 104rpx; height: 40rpx; background: #ffffff; border-radius: 8rpx; border: 1rpx solid #999999"
						>
							已招满
						</view>
					</view>
					<view style="font-weight: 300; font-size: 24rpx; color: #333333">
						<text>{{ obj.companyName }} · 预招{{ obj.total }}人 · {{ obj.salaryStart }}-{{ obj.salaryEnd }}</text>
					</view>
				</view>
			</view>
		</view>
		<!-- <view class="flex-between1" style="background: #f5f6fa; padding: 32rpx">
			<view class="align-center">
				<view class="text1" style="margin-right: 40rpx">查看</view>
				<view class="text2" style="margin-right: 40rpx">电话</view>
				<view class="text2">已报名</view>
			</view>
			<view class="align-center" style="background: #edf2f9; border-radius: 4rpx; padding: 8rpx 18rpx">
				<text style="margin-right: 20rpx">筛选</text>
				<image src="@/static/index/bottom@2x.png" style="width: 22rpx; height: 14rpx"></image>
			</view>
		</view> -->
		<!-- <view class="align-center" style="background: #f5f6fa; padding: 0 32rpx">
			<view class="text1" style="margin-right: 40rpx">全部</view>
			<view class="text2" style="margin-right: 40rpx">筛选中</view>
			<view class="text2" style="margin-right: 40rpx">不合适</view>
			<view class="text2">合适</view>
		</view> -->
		<view style="background: #f5f6fa; padding: 20rpx 32rpx; min-height: 100vh">
			<view class="flex" v-for="(item, index) in list" :key="index" style="position: relative; padding: 20rpx; background-color: #fff; margin-bottom: 20rpx">
				<view style="margin-right: 28rpx">
					<image :src="item.userInfo.head" style="width: 196rpx; height: 240rpx"></image>
				</view>
				<view style="flex: 1">
					<view class="flex-between1">
						<view class="align-center">
							<view style="font-weight: 600; font-size: 32rpx; color: #333333">{{ item.userInfo.name }}</view>
							<view @click.stop.native="$tools.navigite('../index/jianli', 1, item.userId)">
								<u-icon name="file-text" color="#1365F9" size="44"></u-icon>
							</view>
						</view>
						<view class="align-center">
							<view
								class="flex-center1"
								@click="$tools.playphone(item.userInfo.phone)"
								style="margin-right: 20rpx; width: 56rpx; height: 56rpx; background: #1365f9; border-radius: 8rpx"
							>
								<u-icon name="phone-fill" color="#fff" size="40"></u-icon>
							</view>
							<!-- <view class="flex-center1" style="width: 126rpx; height: 56rpx; background: #1365f9; border-radius: 8rpx; font-size: 24rpx; color: #ffffff">
								入住信息
							</view> -->
						</view>
					</view>
					<view style="font-weight: 300; font-size: 24rpx; color: #999999; padding: 14rpx 0">女 | 26岁 | 5-8年 | 未就业备份</view>
					<view class="flex-wrap">
						<view style="margin: 0 20rpx 20rpx 0; padding: 8rpx 20rpx; font-weight: 400; background: #f8f8f8; border-radius: 8rpx; font-size: 24rpx; color: #666666">
							{{ item.userInfo.workIntention }}
						</view>
						<view style="margin: 0 20rpx 20rpx 0; padding: 8rpx 20rpx; font-weight: 400; background: #f8f8f8; border-radius: 8rpx; font-size: 24rpx; color: #666666">
							{{ item.userInfo.income }}
						</view>
						<view style="margin: 0 20rpx 20rpx 0; padding: 8rpx 20rpx; font-weight: 400; background: #f8f8f8; border-radius: 8rpx; font-size: 24rpx; color: #666666">
							{{ item.userInfo.workTime }}
						</view>
						<view style="margin: 0 20rpx 20rpx 0; padding: 8rpx 20rpx; font-weight: 400; background: #f8f8f8; border-radius: 8rpx; font-size: 24rpx; color: #666666">
							{{ item.userInfo.workAddress }}
						</view>
					</view>
					<view style="font-weight: 400; font-size: 24rpx; color: #333333">{{ item.userInfo.remark }}</view>
				</view>
				<!-- <view style="position: absolute; right: 20rpx; bottom: 40rpx">
					<image src="@/static/fuwu/hs1.png" style="width: 124rpx; height: 108rpx"></image>
					<image src="@/static/fuwu/hs2.png" style="width: 124rpx; height: 108rpx"></image>
				</view> -->
			</view>
			<view v-if="!list.length" style="text-align: center; padding-top: 100rpx">暂无数据~</view>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			obj: {},
			list: {},
			id: '',
			type: ''
		};
	},
	onLoad(option) {
		this.id = option.value;
		this.type = option.value1;
		this.getlist();
		this.getdetail();
	},
	methods: {
		getlist() {
			this.$request('front/company/postDetail', {
				id: this.id,
				type: this.type
			}).then((res) => {
				console.log(res.obj.list, '列表');
				this.list = res.obj.list;
			});
		},
		getdetail() {
			this.$request('front/user/postDetail', {
				id: this.id
			}).then((res) => {
				console.log(res, '详情');
				this.obj = res.obj;
				this.obj.projectImg.split(',')[0];
			});
		}
	}
};
</script>

<style lang="less" scoped>
.myldz {
	padding-top: 180rpx;
	.text1 {
		font-weight: 600;
		font-size: 28rpx;
		color: #1365f9;
	}
	.text2 {
		font-weight: 400;
		font-size: 28rpx;
		color: #999999;
	}
	.box {
		position: fixed;
		bottom: 100rpx;
		right: 32rpx;
	}
}
</style>
